// 格式化日对象
const getNowDate = () => {
	var date = new Date();
	var sign2 = ":";
	var year = date.getFullYear() // 年
	var month = date.getMonth() + 1; // 月
	var day = date.getDate(); // 日
	var hour = date.getHours(); // 时
	var minutes = date.getMinutes(); // 分
	var seconds = date.getSeconds() //秒
	// 给一位数的数据前面加 “0”
	if (month >= 1 && month <= 9) {
		month = "0" + month;
	}
	if (day >= 0 && day <= 9) {
		day = "0" + day;
	}
	if (hour >= 0 && hour <= 9) {
		hour = "0" + hour;
	}
	if (minutes >= 0 && minutes <= 9) {
		minutes = "0" + minutes;
	}
	if (seconds >= 0 && seconds <= 9) {
		seconds = "0" + seconds;
	}
	return year + "-" + month + "-" + day + " " + hour + sign2 + minutes + sign2 + seconds;
}
// 存储项目任务参数函数
const setStorageEntityProjectXmRwIdObj = (obj) => {
	let newObj = {
		rwId: obj.rwId,
		rwName: obj.rwName,
		xmId: obj.xmId,
		xmName: obj.xmName
	}
	uni.removeStorageSync('entityProjectXmRwIdObj') //先移除现有的  再重新存储
	uni.setStorageSync('entityProjectXmRwIdObj', newObj)
}
export {
	getNowDate,
	setStorageEntityProjectXmRwIdObj
}